<template>
	<view>
		<view class="cu-list menu" :class="[menuBorder?'sm-border':'',menuCard?'card-menu margin-top':'']">
			<view class="cu-item" :class="menuArrow?'arrow':''">
				<view class="content" style="display: flex;align-items: center;">
					<text class="cuIcon-titles text-orange"></text>活动名称：{{activityName}}
				</view>
			</view>
			<view class="cu-item" :class="menuArrow?'arrow':''" v-for="item in partnerList" :key="item.telephone">
				<view class="content" style="display: flex;align-items: center;text-align: center;justify-content: center;">
					&nbsp;姓名：{{item.name}}; &nbsp;手机号码：{{item.telephone}};
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				activityId: '',
				activityName: '',
				Authorization: '',
				partnerList:[],
				menuBorder: false,
				menuArrow: false,
				menuCard: true,
			}
		},
		onLoad(id) {
			this.activityId = id.activityId
			this.activityName = id.activityName
			this.getpartner()
		},
		methods:{
			getpartner(){
				if (document.cookie.length > 0) {
				  var arr = document.cookie.split("; "); 
				  for (var i = 0; i < arr.length; i++) {
				    var arr2 = arr[i].split("="); 
				    //判断查找相对应的值
					if (arr2[0] == "Authorization") {
						this.Authorization = arr2[1];
						 let a = arr2[1]
						 let that = this
						 uni.request({
						 	url: 'http://101.37.15.60:8080/activity/tookUsersList',
						 	data: {
						 		activityId: that.activityId
						 	},
							header:{
								'Authorization': "Bearer "+that.Authorization
							},
						 	success: (res) => {
						 	    if(res.data.message == 'SUCCESS') {
						 			that.partnerList = res.data.data
						 		}
						 	}
						 })
					}
				  }
				}
			}
		}
	}
</script>

<style>
</style>
